package com.nix.model.page.cursor;


public class NXTextWordCursor {

	
	private NXParagraphCursor myParagraphCursor;
	private int myElementIndex;
	private int myCharIndex;
	
//	private int myModelIndex;

	public NXTextWordCursor() {
	}

	public NXTextWordCursor(NXTextWordCursor cursor) {
		setCursor(cursor);
	}
	
	public void setCursor(NXTextWordCursor cursor){
		
		this.myParagraphCursor = cursor.myParagraphCursor;
		this.myCharIndex = cursor.myCharIndex;
		this.myElementIndex = cursor.myElementIndex;
	
	}

	
	
	//移动 TODO
	public void moveTo(int myElementIndex, int endStartCharIndex){
		//TODO
	}
	
	public boolean nextParagraph(){
		
		//TODO
		return false;
		
	}
	
	public boolean isEndOfParagraph() {
		return (myParagraphCursor != null) && (myElementIndex == myParagraphCursor.getParagraphLength());
	}

	
	
	public NXParagraphCursor getMyParagraphCursor() {
		return myParagraphCursor;
	}

	public void setMyParagraphCursor(NXParagraphCursor myParagraphCursor) {
		this.myParagraphCursor = myParagraphCursor;
	}

	public int getMyElementIndex() {
		return myElementIndex;
	}

	public void setMyElementIndex(int myElementIndex) {
		this.myElementIndex = myElementIndex;
	}

	public int getMyCharIndex() {
		return myCharIndex;
	}

	public void setMyCharIndex(int myCharIndex) {
		this.myCharIndex = myCharIndex;
	}
	
}
